package com.example.demo.entity.VO;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "UserVO对象", description = "用于微信小程序用户登录")
public class UsersLoginByWeChatVO {
    @ApiModelProperty("用户id")
    private Long userId;

    @NotNull(message = "用那种方式登录的 不能为空")
    @ApiModelProperty("用那种方式登录的")
    private String nickname;

    @NotBlank(message = "code 不能为空")
    @Size(min = 1, max = 50, message = "cod 长度必须在1到50个字符之间")
    @ApiModelProperty("输入code获取微信登录的OpenID")
    private String code;

    @NotBlank(message = "用户头像 不能为空")
    @Size(min = 1, max = 355, message = "用户头像 长度必须在1到355个字符之间")
    @ApiModelProperty("用户头像")
    private String userHeaderimg;

    @NotBlank(message = "openid不能为空")
    @Size(min = 1, max = 200, message = "openid 长度必须在1到50个字符之间")
    @ApiModelProperty("微信登录的OpenID")
    private String openId;

    @ApiModelProperty("用户密码")
    @NotBlank(message = "密码不能为空")
    @Size(min = 1, max = 35, message = "密码 长度必须在1到50个字符之间")
    private String password;
}
